/**
*  \file interpol_u16_u16.h
*
*  \brief  Linear interpolation module for U16 input and output.
**
*  \author Michael J. Hohmann  michael.hohmann@linde-mh.de
*
*
*
*
*
*/
#ifndef INTERPOL_U16_U16_H_INCLUDED
#define INTERPOL_U16_U16_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "../cfg/prj.h"

/*================================================[ public defines   ]================================================*/

/*================================================[ public datatypes ]================================================*/
/** Object definition.
* 
* The struct interpol_u16_u16_object defines the attribute of an object.
*/
struct interpol_u16_u16_obj
{	
   pal_size_t count;   /**< Number of data points of the curve */
   U16 const *x;       /**< Pointer to an array of x values */
   U16 const *y;       /**< Pointer to an array of y values */
};

/*================================================[ public variables ]================================================*/

/*================================================[ inline functions ]================================================*/

/*================================================[ public functions ]================================================*/
/**
*  Initialization.
*
*  Initialize the interpol_u16_u16 module.
*  \param me object pointer
*  \param[in] value input value of interpolation
*
*  \return RC_SUCCESS if successful.
*/
U16 interpol_u16_u16( struct interpol_u16_u16_obj const *me, U16 value );

/**
*  Constructor.
*
*  Construct an object. 
*
*  \param me Object pointer. NULL will throw an assert.
*
*  \return RC_SUCCESS if successful.
*/
RC interpol_u16_u16_construct( struct interpol_u16_u16_obj *me, pal_size_t count, U16 const * p_x, U16 const * p_y );

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
*                             Copyright 2018 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/
